$(function () {
    $.ajax({
        url: Feng.ctxPath + "/consultant/getDoctor",
        type: "get",
        success: function (data) {
            var txt = '<option value="">--请选择医生--</option>';
            for (var i = 0; i < data.length; i++) {
                txt += '<option value="' + data[i].doctor + '">' + data[i].doctor + '</option>';
            }
            document.getElementById('doctors').innerHTML = txt;
            var seleteDoctorValue = $('#userName').val();
            if (seleteDoctorValue != "") {
                $("#doctors option[value=" + seleteDoctorValue + "]").attr("selected", "selected");
            }
        },
        error: function (data) {
            alert('没有权限，请联系管理员!');
        }
    });
    $.ajax({
        url: Feng.ctxPath + "/outpatientManagement/getList",
        type: "post",
        success: function (data) {
            var txt = '<option value="">--请选择门店--</option>';
            for (var i = 0; i < data.length; i++) {
                txt += '<option value="' + data[i].simplename + '">' + data[i].simplename + '</option>';
            }
            document.getElementById('storeNew').innerHTML = txt;
            var seleteStoreValue = $('#storeValue').val();
            if (seleteStoreValue != "") {
                $("#storeNew option[value=" + seleteStoreValue + "]").attr("selected", "selected");
            }
        },
        error: function (data) {
            alert('没有权限，请联系管理员!');
        }
    });
})